<%--
  Created by IntelliJ IDEA.
  User: 陈俊雄
  Date: 2018/5/28
  Time: 15:14
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<!-- Main view -->
<div class="animated fadeInRight">
    <div class="wrapper wrapper-content ng-scope" ng-controller="quickTestCtrl">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content sk-loading">
                        <div class="sk-spinner sk-spinner-wave">
                            <div class="sk-rect1"></div>
                            <div class="sk-rect2"></div>
                            <div class="sk-rect3"></div>
                            <div class="sk-rect4"></div>
                            <div class="sk-rect5"></div>
                        </div>
                        <uib-tabset active="activeForm">
                            <uib-tab index="0" heading="内嵌测试">
                                <ng-include src="'quickTestForm.html'"></ng-include>
                            </uib-tab>
                            <uib-tab index="1" heading="跳转测试">
                                <ng-include src="'quickTestForm.html'"></ng-include>
                            </uib-tab>
                        </uib-tabset>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/ng-template" id="quickTestForm.html">
    <form name="inlinePayForm" class="form-horizontal" target="_blank"
          action="${pageContext.request.contextPath}/merchant/quickTest/test"
          method="post" enctype="application/x-www-form-urlencoded">
        <%-- 交易数据 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">交易数据</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    商户号【MerNo】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" name="merNo" ng-model="quickTest.merNo">
                        <option ng-repeat="x in merchantInfo" value="{{x.id}}">{{x.id + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    商户订单号【BillNo】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text" name="billNo"
                           ng-model="quickTest.billNo">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    总金额【Amount】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number" name="amount"
                           ng-model="quickTest.amount">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    运费【Freight】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number" name="freight"
                           ng-model="quickTest.freight">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    手续费【Fee】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number" name="fee"
                           ng-model="quickTest.fee">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    交易币种【Currency】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.currency" name="currency">
                        <option ng-repeat="x in currency" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    用户id【CustomerId】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text" name="customerId"
                           ng-model="quickTest.customerId">
                </div>
            </div>
        </div>
        <%-- 商品信息 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">商品信息</div>
        <div ng-repeat="x in quickTest.productDetails">
            <div class="clearfix">
                <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                    <label class="col-sm-4 control-label p-w-xs">
                        商品id【GoodId】
                    </label>
                    <div class="col-sm-8 p-w-xs">
                        <input class="form-control b-r-sm" type="text" ng-model="x.goodId"
                               name="productDetails[{{$index}}].goodId">
                    </div>
                </div>
                <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                    <label class="col-sm-4 control-label p-w-xs">
                        商品名【GoodName】
                    </label>
                    <div class="col-sm-8 p-w-xs">
                        <input class="form-control b-r-sm" type="text"
                               ng-model="x.goodName"
                               name="productDetails[{{$index}}].goodName">
                    </div>
                </div>
                <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                    <label class="col-sm-4 control-label p-w-xs">
                        商品价格【Price】
                    </label>
                    <div class="col-sm-8 p-w-xs">
                        <input class="form-control b-r-sm" type="number"
                               ng-model="x.price"
                               name="productDetails[{{$index}}].price">
                    </div>
                </div>
                <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                    <label class="col-sm-4 control-label p-w-xs">
                        商品数量【Qty】
                    </label>
                    <div class="col-sm-8 p-w-xs">
                        <input class="form-control b-r-sm" type="number"
                               ng-model="x.qty"
                               name="productDetails[{{$index}}].qty">
                    </div>
                </div>
            </div>
        </div>
        <%-- 用户信息 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">用户信息</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    姓【BillFirstName】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billFirstName" name="billFirstName">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    名【BillLastName】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billLastName" name="billLastName">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    地址【BillAddress】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billAddress" name="billAddress">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    城市【BillCity】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billCity" name="billCity">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    州/省【BillState】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billState" name="billState">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    国家【BillCountry】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <%--<input class="form-control b-r-sm" type="text" ng-model="quickTest.merNo"--%>
                           <%--uib-typeahead="x.secondValue as x.secondValue + '(' + x.name + ')' for x in country | filter: {secondValue :$viewValue}"--%>
                           <%--typeahead-min-length="0" >--%>
                    <select class="form-control b-r-sm" ng-model="quickTest.billCountry" name="billCountry">
                        <option ng-repeat="x in country" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    邮编【BillZip】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billZip" name="billZip">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    邮箱【BillEmail】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billEmail" name="billEmail">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    电话【BillPhone】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.billPhone" name="billPhone">
                </div>
            </div>
        </div>
        <%-- 收货人信息 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">收货人信息</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    姓【shipFirstName】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipFirstName" name="shipFirstName">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    名【shipLastName】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipLastName" name="shipLastName">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    地址【shipAddress】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipAddress" name="shipAddress">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    城市【shipCity】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipCity" name="shipCity">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    州/省【shipState】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipState" name="shipState">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    国家【shipCountry】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.shipCountry" name="shipCountry">
                        <option ng-repeat="x in country" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    邮编【shipZip】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipZip" name="shipZip">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    邮箱【shipEmail】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipEmail" name="shipEmail">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    电话【shipPhone】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.shipPhone" name="shipPhone">
                </div>
            </div>
        </div>
        <%-- 系统参数 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">系统参数</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    页面语言【Lang】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.lang" name="lang">
                        <option ng-repeat="x in lang" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    支付方式【PayMode】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.payMode" name="payMode">
                        <option ng-repeat="x in payMode" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    支付类型【PayType】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.payType" name="payType" ng-disabled="quickTest.payMode == null">
                        <option ng-repeat="x in payType" value="{{x.firstValue}}">{{x.firstValue + '(' + x.name + ')'}}</option>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    返回地址【ReturnURL】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.returnURL" name="returnURL">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    通知地址【NotifyURL】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.notifyURL" name="notifyURL">
                </div>
            </div>
        </div>
        <%-- 验证参数 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">验证参数</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    交易备注【Remark】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.remark" name="remark">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    Md5Info
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.md5Info" name="md5Info">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    客户ip【Ip】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.ip" name="ip">
                </div>
            </div>
        </div>
        <%-- 内嵌参数 --%>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center" ng-show="activeForm == 0">内嵌参数</div>
        <div class="clearfix" ng-show="activeForm == 0">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    卡号【CardNo】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number"
                           oninput="if(value.length>16) value=value.slice(0,16)"
                           ng-model="quickTest.cardNo" name="cardNo">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    发卡行【Issue】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="text"
                           ng-model="quickTest.issue" name="issue">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    安全码【SecurityNum】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number"
                           oninput="if(value.length>4) value=value.slice(0,4)"
                           ng-model="quickTest.securityNum" name="securityNum">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    有效年【ExpireYear】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number"
                           oninput="if(value.length>4) value=value.slice(0,4)"
                           ng-model="quickTest.expireYear" name="expireYear">
                </div>
            </div>
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    有效月【ExpireMonth】
                </label>
                <div class="col-sm-8 p-w-xs">
                    <input class="form-control b-r-sm" type="number"
                           oninput="if(value.length>2) value=value.slice(0,2)"
                           ng-model="quickTest.expireMonth" name="expireMonth">
                </div>
            </div>
        </div>
        <div class="bg-muted p-xxs m-t-sm m-b-sm b-r-sm text-center">支付地址</div>
        <div class="clearfix">
            <div class="col-lg-4 col-md-6 col-sm-12 m-b-sm" style="height: 43px">
                <label class="col-sm-4 control-label p-w-xs">
                    支付地址
                </label>
                <div class="col-sm-8 p-w-xs">
                    <select class="form-control b-r-sm" ng-model="quickTest.payURL" name="payURL">
                        <option ng-repeat="x in quickTestURL" value="{{x.firstValue}}">{{x.name}}</option>
                    </select>
                </div>
                <input type="number" name="transType" ng-show="false" ng-model="quickTest.transType">
            </div>
        </div>
        <div class="text-center m-md">
            <button class="btn btn-primary" type="submit">
                Rxhpay Pay
            </button>
        </div>
    </form>
</script>